<template>
  <view>
		<view :style="{ width: html.width + 'px', height: html.height + 'px', backgroundColor: '#ccc' }">
			<up-image
				:showLoading="true"
				:lazy-load="true"
				@click="previewImg(html.url)"
				:src="html.url"
				:width="html.width"
				:height="html.height"
				mode="aspectFit"
			>
			</up-image>
		</view>
  </view>
</template>

<script>
import { chatApi } from '@/apis/cloud/chat'

	
export default {
  name: 'ImageItem',
  props: {
		html: {
			type: Object,
			required: true
		}
  },
  data() {
		return {

		}
	},
	methods: {
		previewImg(url) {
			this.$emit('previewImg', url);
		}
  }
};
</script>

<style lang="scss" scoped>

</style>
